{extend name="base" /}
{block name="css"}
{css href="__CSS__/goods.css" /}
{/block}
{block name="body"}
<!-- 主要内容 开始 -->
<div class="weui-tab__bd-item">
    <header class="weui-navBar weui-navBar-fixed">
        <a href="javascript:history.go(-1);" class="weui-navBar-item">
            <i class="icon iconfont icon-fanhui f-white"></i>
        </a>
        <div class="weui-center">
            <span class="weui-center-title f-white"></span>
        </div>
        <a href="javascript:;" class="weui-navBar-item actionsheet">
            <i class="icon iconfont icon-gengduo f-white"></i>
        </a>
    </header>
    <div class="swiper-container">
        <div class="swiper-wrapper">
            {volist name="$data.img" id="v"}
            <div class="swiper-slide"><img src="{$v}" /></div>
            {/volist}
        </div>
        <div class="swiper-pagination"></div>
    </div>
    <div class="weui-media-box weui-media-box_text">
        <h4 class="weui-media-box__title">{$data.name|default='商品名称'}</h4>
        <p class="weui-media-box__desc">{$data.goods_brief|default='由各种物质组成的巨型球状天体，叫做星球。星球有一定的形状，有自己的运行轨道'}</p>
        <div class="weui-flex">
            <div class="weui-flex__item">
                <div class="placeholder"><span class="price"><span><em>￥</em>{$data.shop_price|substr=0,-3}<i>{$data.shop_price|substr=-3,3}</i></span></div>
            </div>
            <div class="weui-flex__item">
                <div class="placeholder"><del>￥{$data.market_price|default="0.00"}</del></div>
            </div>
            <div class="weui-flex__item">
                <div class="placeholder">销售{$data.sold|default=0}</div>
            </div>
        </div>
    </div>
    <span class="weui-center-title">商品详情</span>
    <div class="page__bd">
      {$data.content|raw}
    </div>
    <div class="divFooter"></div>
</div>
<!-- 主要内容 结束 -->
{/block}
{block name="js"}
{js href="__LIB__/js/swiper.js" /}
<script type="text/javascript">
    $(function() {
        //轮播图
        $(".swiper-container").swiper({
            loop: true,
            autoplayDisableOnInteraction: false,
            autoplay: 3000
        });
        //向上滑动显示
        // $(".weui-navBar-fixed").hide();
        // $(window).scroll(function(){
        //   if ($(window).scrollTop()>50){
        //     $(".weui-navBar-fixed").fadeIn(50);
        //   }else{
        //     $(".weui-navBar-fixed").fadeOut(50);
        //   }
        // });
    });
</script>
{/block}